local jieshen = fk.CreateSkill{
    name = "ym2__jieshen",
}
Fk:loadTranslationTable{
    ["ym2__jieshen"] = "孑身",
    [":ym2__jieshen"] = "若你体力值或手牌数为全场唯一值，你可以将【影】当做【无懈可击】或【闪】使用或打出，均满足则视为均不满足。",
    ["#ym2__jieshen"] = "孑身：将一张【闪】当【无懈可击】或【闪】使用或打出",
    ["$ym2__jieshen1"] = "夫安子孝，便是你我之福。",
    ["$ym2__jieshen2"] = "兄友弟恭，方能保国祚万古。",
}
jieshen:addEffect("viewas",{
    anim_type = "defensive",
    prompt = "#ym2__jieshen",
    pattern = "jink,nullification",
    interaction = function (self, player)
        local all_choices = {"jink", "nullification"}
        local choices = player:getViewAsCardNames(jieshen.name, all_choices)
        return UI.CardNameBox { choices = choices, all_choices = all_choices, }
    end,
    view_as = function (self, player, cards)
        if self.interaction.data == nil or #cards == 0 then return nil end
        local c = Fk:cloneCard(self.interaction.data)
        c.skillName = jieshen.name
        c:addSubcards(cards)
        return c
    end,
    card_filter = function (self, player, to_select, selected)
        return #selected == 0 and Fk:getCardById(to_select).trueName == "shade"
    end,
    enabled_at_play = function (self, player)
        return table.find(Fk:currentRoom().alive_players,function (tp)
            return tp.id ~= player.id and tp.hp == player.hp
        end) ~= table.find(Fk:currentRoom().alive_players,function (tp)
            return tp.id ~= player.id and tp:getHandcardNum() == player:getHandcardNum()
        end)
    end,
    enabled_at_response = function (self, player, response)
        return table.find(Fk:currentRoom().alive_players,function (tp)
            return tp.id ~= player.id and tp.hp == player.hp
        end) ~= table.find(Fk:currentRoom().alive_players,function (tp)
            return tp.id ~= player.id and tp:getHandcardNum() == player:getHandcardNum()
        end)
    end,
})
return jieshen